{{template "header.html" .}}
<div class="container" id="user-list-container">
    <div id="user-list-header" class="clear">
        <h1 class="h1 left">用户</h1>
        <button class="btn save right" id="user-list-edit-btn">创建新用户</button>
    </div>
    <div id="user-list">{{range .Users}}
        <div class="user-list-item clear">
            <div class="left">
                <h3 class="h3"><a href="/admin/users/edit/{{.id}}/">{{.real_name}}</a></h3>
                <p class="info">
                    <span class="account">用户名：{{.user}}</span>
                    <span class="email">邮箱：{{.email}}</span>
                    <span class="status {{.status}}">{{if eq .status "active"}}启用中{{else}}关闭中{{end}}</span>
                </p>
            </div>
            <span class="right role {{.role_name}}">{{.role_name}}</span>
        </div>{{end}}
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
       $('#user-list-edit-btn').on("click",function(){
           window.location.href = "/admin/users/add";
       }) ;
    });
</script>
</body>
</html>